package com.tadpole.music.adapter.home;

import android.app.Activity;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import androidx.annotation.NonNull;

import com.tadpole.music.R;
import com.tadpole.music.adapter.base.BaseAdapter;
import com.tadpole.music.holder.base.BaseViewHolder;
import com.tadpole.music.holder.home.WeekViewHolder;

import java.util.List;

/**
 * 星期
 * Created By 孙岩
 * on 2020/12/9
 */
public class WeekAdapter extends BaseAdapter {
    private WeekViewHolder weekViewHolder;
    private Activity activity;
    private List<String> list;
    public WeekAdapter(Activity activity, List<String> list){
        this.activity = activity;
        this.list = list;
    }

    @Override
    public BaseViewHolder createRelHolder(ViewGroup parent, int viewType) {
        weekViewHolder = new WeekViewHolder(LayoutInflater.from(activity).inflate(R.layout.item_date, parent, false),list);
        return  weekViewHolder;
    }

    @Override
    public int getRelItemCount() {
        return list.size();
    }

    @Override
    public void setOnItemClickListener(OnItemClickListener listener) {

    }

    @Override
    public void setOnChildClickListener(OnChildClickListener listener) {

    }

    @Override
    public void setOnLongClickListener(OnLongClickListener listener) {

    }

    @Override
    public void onBindViewHolder(@NonNull BaseViewHolder holder, int position) {
        holder.init(position - mHeadViews.size());
    }
}
